package com.cssy.yd.logic.dao;

import com.cssy.yd.logic.entity.LogicMaterialReturnItemDO;
import com.plat.helper.SearchConditions;

import java.util.List;
import org.springframework.dao.DataAccessException;

/**
 * 数据访问对象接口
 * @since 2013-08-27
 */
public interface LogicMaterialReturnItemDAO {

    /**
     * 插入数据
     * @param logicMaterialReturnItemDO
     * @return 插入数据的主键
     */
    public String insertLogicMaterialReturnItemDO(LogicMaterialReturnItemDO logicMaterialReturnItemDO) throws DataAccessException;

    /**
     * 统计记录数
     * @param logicMaterialReturnItemDO
     * @return 查出的记录数
     */
    public Integer countLogicMaterialReturnItemDOByExample(LogicMaterialReturnItemDO logicMaterialReturnItemDO) throws DataAccessException;

    /**
     * 更新记录
     * @param logicMaterialReturnItemDO
     * @return 受影响的行数
     */
    public Integer updateLogicMaterialReturnItemDO(LogicMaterialReturnItemDO logicMaterialReturnItemDO) throws DataAccessException;

    /**
     * 获取对象列表
     * @param logicMaterialReturnItemDO
     * @return 对象列表
     */
    public List<LogicMaterialReturnItemDO> findListByExample(LogicMaterialReturnItemDO logicMaterialReturnItemDO) throws DataAccessException;

    /**
     * 根据主键获取logicMaterialReturnItemDO
     * @param id
     * @return logicMaterialReturnItemDO
     */
    public LogicMaterialReturnItemDO findLogicMaterialReturnItemDOByPrimaryKey(String id) throws DataAccessException;

    /**
     * 删除记录
     * @param id
     * @return 受影响的行数
     */
    public Integer deleteLogicMaterialReturnItemDOByPrimaryKey(String id) throws DataAccessException;

    public List<LogicMaterialReturnItemDO> find(SearchConditions scs) throws DataAccessException;
    
    public Integer count(SearchConditions scs) throws DataAccessException ; 

    /**
     * 根据退料单id查询所有的订单信息
     * @param mareturnid
     * @return
     * @throws DataAccessException
     */
    public List<LogicMaterialReturnItemDO> findByMaReturnid(String mareturnid) throws DataAccessException;
    
    /**
     * 根据退料单id删除所有信息
     * @param mareturnid
     * @throws DataAccessException
     */
    public void deleteByMaReturnid(String mareturnid) throws DataAccessException; 
}